Your email platform is great at sending. But what if the product recommendations inside each email updated themselves in real time — showing each recipient exactly what they’re most likely to buy, based on their most recent behavior, at the moment they open the email?
That’s what Personyze’s open-time email personalization does. It works by dropping a single HTML snippet into any campaign template — no matter which ESP you use. This guide walks you through the whole process for Mailchimp, Klaviyo, HubSpot, ActiveCampaign, Brevo, and Constant Contact.
How open-time personalization works
Traditional email product blocks bake content in at send time — every recipient gets the same thing. Personyze’s approach is different: you embed an HTML snippet once inside your campaign template. Every time a customer opens that email, the snippet calls Personyze live, identifies the recipient, and renders a personalized recommendation image right then.
From purchase to personalized email — the flow
- Personyze tracks the purchase live — your site fires a
purchaseevent with order details to Personyze. - Your ESP sends the order confirmation with the Personyze snippet embedded as image tags.
- Customer opens the email — their email client requests the image URLs from Personyze.
- Personyze renders personalized images on the fly — pulled from each recipient’s behavioral profile and your live product catalog.
<img> tags pointing to Personyze URLs. Any email platform that lets you drop in custom HTML works — Mailchimp, Klaviyo, HubSpot, ActiveCampaign, Brevo, Constant Contact, Campaign Monitor, Salesforce Marketing Cloud, and more.Prerequisites
- An active Personyze account with email recommendations enabled on your plan
- Access to your email platform with permission to edit campaign HTML
- A product catalog ready to upload — or one already synced in Personyze
- Personyze’s tracking script installed on your website for behavioral data
Step 1 — Upload your product catalog
Personyze uses a single unified product database. If you’ve already uploaded products for on-site recommendations, skip this step entirely. Otherwise, go to Settings → Product Catalog and choose one of three sync methods:
Step 2 — Set up product interaction tracking
Personyze captures behavioral data through product interaction events — views, add-to-carts, and purchases — fired from your website. If Personyze is already running on-site, this is already done.
Install the Personyze tag
Add the Personyze tracking script to your site’s <head>. You’ll find your unique snippet in Settings → Tracking Code. It looks like this:
<script>
window._S_T || function(s) {
s.async = true;
s.src = '//counter.personyze.com/stat-track-lib.js';
s.onload = function() {
_S_T.async = true;
_S_T.setup(YOUR_ACCOUNT_ID, "your-domain.com");
};
(document.querySelector('head') || document.documentElement).appendChild(s);
}(document.createElement('script'))
</script>
Fire product view events
On each product detail page, fire a product_view event so Personyze can build behavioral profiles. This is what powers the Personalized Recommendations algorithm in email:
window.personyze = window.personyze || [];
window.personyze.push(['trackEvent', 'product_view', {
product_id: 'SKU-1234',
product_name: 'Blue Running Shoe',
category: 'Footwear > Running',
price: 89.99,
currency: 'USD'
}]);
Track add-to-cart and purchases
For the strongest recommendations, also fire add_to_cart and purchase events on the relevant pages:
// On add-to-cart
window.personyze.push(['trackEvent', 'add_to_cart', {
product_id: 'SKU-1234', price: 89.99, currency: 'USD'
}]);
// On purchase confirmation
window.personyze.push(['trackEvent', 'purchase', {
order_id: 'ORD-9876',
products: [
{ product_id: 'SKU-1234', price: 89.99, quantity: 1 }
],
total: 89.99, currency: 'USD'
}]);
Step 3 — Build your widget in Personyze
Navigate to Email Recommendations → Get Code Wizard. The wizard takes you through three sub-steps: algorithm, template, and customization.
Algorithm options
Template & customization
After choosing an algorithm, select a template layout from the library, then use the left panel to customize colors, badges, button text, image sizing, and spacing. The live preview updates in real time.
Available templates include Row Card, Gradient Overlay, Minimal Elegant, Dark Showcase, and Horizontal Rows:

Set the number of products to display — typically 3–4 for transactional emails, up to 6 for dedicated recommendation campaigns.
Step 4 — Understanding the embed code
How it actually works — unique URLs per recipient
The snippet Personyze generates is not a generic image. Each <img src> is a unique URL that encodes the recipient’s identity. When a subscriber opens the email, their email client requests that URL from Personyze. Personyze then:
- Looks up the subscriber’s behavioral profile (browsing history, purchases, categories viewed)
- Runs your chosen recommendation algorithm against that profile
- Checks your live product catalog for current pricing and availability
- Renders and returns a personalized product image — live, at that moment
Each product slot in the widget has its own URL (ending in /k=...v, /k=...w, etc.) so Personyze can independently optimize what goes in each slot.
The generated snippet
<table>
<tr>
<td>
<a href="https://pic.personyze.com/href/k=8qy0zs2vbzcv/email={INSERT EMAIL HERE}">
<img src="https://pic.personyze.com/png/k=8qy0zs2vbzcv/email={INSERT EMAIL HERE}" alt="Recommended"/>
</a>
</td>
<td>
<a href="https://pic.personyze.com/href/k=8qy0zs2vbzcw/email={INSERT EMAIL HERE}">
<img src="https://pic.personyze.com/png/k=8qy0zs2vbzcw/email={INSERT EMAIL HERE}" alt="Recommended"/>
</a>
</td>
</tr>
</table>
The fallback — why you always get something useful
When you send a campaign, Personyze has never seen your recipient list before — it doesn’t know who’s in your Mailchimp or Klaviyo audience until the email is opened. So Personyze is designed with a smart fallback:
- If a recipient’s email is known to Personyze (they’ve visited your site with tracking active and their identity was captured) — they get fully personalized recommendations.
- If a recipient’s email is not yet in Personyze (new subscriber, or tracking not yet linked) — the widget falls back to your configured fallback algorithm, typically Most Popular or Best Sellers, so the email still shows relevant suggestions rather than a broken image.
Configure your fallback in the Recommendation step under Fallback recommendation if no results.
Non-personal recommendations (no tracking required)
Don’t have behavioral tracking set up yet? You can still use Personyze for email recommendations using context-based approaches:
- Pass a product ID in the URL — for example, in a post-purchase email for order #XYZ, pass the product ID and Personyze will surface items bought together or viewed together with that product, based on aggregate behavior.
- Site-wide best sellers — with no individual or product context, Personyze surfaces your current top-performing products based on all visitor activity. A strong baseline that still beats static editorial picks.
{INSERT EMAIL HERE} — one in the href (click tracking) and one in the src (image render). Replace all occurrences, not just the first one.Step 5 — Insert into your email platform
The process is the same for every ESP: add the Personyze HTML snippet to your campaign, then swap the placeholder with that platform’s merge tag for the subscriber’s email address. The exact merge tag differs per platform — sections below cover the major ones.
🐒 Mailchimp
- Open your campaign template. Go to Campaigns → Email Templates (or open a draft and click Edit Design) to launch the drag-and-drop editor.
- Add a Code content block. Drag a Code block from the sidebar into your template — typically below the main hero, above the footer.
- Paste the snippet and replace the placeholder. Click into the Code block, paste the full HTML, then replace
{INSERT EMAIL HERE}with Mailchimp’s merge tag:*|EMAIL|* - Send a test email to verify. Use Preview & Test → Send a Test Email — the visual preview won’t substitute merge tags. Open the test in your inbox to confirm the image loads with real recommendations.
*|EMAIL|* in the URL. Always send a real test email to verify.🎯 Klaviyo
- Open the email template editor. Navigate to Content → Templates or open your Flow/Campaign email and click Edit.
- Add a Text or HTML block. Drag in a Text block and switch to HTML mode, or use an HTML block if your template supports it. Paste the Personyze snippet.
- Replace the placeholder. Klaviyo uses double-curly-brace Django-style templating. Replace
{INSERT EMAIL HERE}with:{{ email }} - Preview with a real profile. Use Klaviyo’s Preview as Person feature, select a real subscriber, and verify the image loads with personalized recommendations.
🟠 HubSpot
- Open the email editor. Go to Marketing → Email and open or create a campaign. Click Edit to launch the drag-and-drop editor.
- Add a Rich Text or Custom HTML module. Drag a Rich Text module into your template. Click the
</> Source Codeicon in the toolbar to switch to HTML mode. Paste the Personyze snippet. - Replace the placeholder. HubSpot uses HubL (HubSpot’s templating language). Replace
{INSERT EMAIL HERE}with:{{ contact.email }} - Send a test & preview. Use HubSpot’s Send Test Email with a real contact record to confirm the merge tag resolves and recommendations load.
⚡ ActiveCampaign
- Open the email designer. Navigate to Campaigns → Create a Campaign or open an existing automation email. Use the New Email Designer.
- Add an HTML block. Drag an HTML content block into your template. Click to edit and paste the Personyze snippet.
- Replace the placeholder. ActiveCampaign uses percent-wrapped tags. Replace
{INSERT EMAIL HERE}with:%EMAIL% - Test via automation. Add a test contact to the automation or use Send Preview Email with a real contact to verify the tag resolves and recommendations appear.
💙 Brevo (formerly Sendinblue)
- Open the template editor. Go to Email → Templates and open or create a template.
- Switch to the HTML editor. Click the
</> HTMLbutton in the top right to access the raw HTML. Paste the Personyze snippet where you want the recommendations to appear. - Replace the placeholder. Brevo uses double-curly-brace syntax. Replace
{INSERT EMAIL HERE}with:{{ contact.EMAIL }}(uppercase). - Send test. Use Preview & Test → Send Test Email with a real contact to confirm personalization renders correctly.
📮 Constant Contact
- Open the email template. Go to Campaigns → Create an Email, choose your template, and open the editor.
- Add a Custom Code block. Click Insert → More → Custom Code to add a raw HTML block. Paste the Personyze snippet.
- Replace the placeholder. Constant Contact uses an older-style tag format. Replace
{INSERT EMAIL HERE}with:$[LN:EMAIL:$] - Preview & test. Use Preview → Preview As Subscriber and select a real subscriber to verify the personalization tag resolves correctly before sending.
Quick reference — email merge tags
Summary of the exact merge tag to use for each platform when replacing {INSERT EMAIL HERE}:
| Email platform | Replace {INSERT EMAIL HERE} with |
Notes |
|---|---|---|
| Mailchimp | *|EMAIL|* |
Standard Mailchimp merge tag |
| Klaviyo | {{ email }} |
Django-style template variable |
| HubSpot | {{ contact.email }} |
HubL contact property |
| ActiveCampaign | %EMAIL% |
Percent-wrapped personalization tag |
| Brevo | {{ contact.EMAIL }} |
Uppercase field name |
| Constant Contact | $[LN:EMAIL:$] |
Substitution tag |
| Campaign Monitor | [email] |
Bracketed merge tag |
| Salesforce Marketing Cloud | %%emailaddr%% |
AMPscript substitution string |
| Any other ESP | Your platform’s email merge tag | Check your platform’s docs |
{INSERT USER ID HERE} placeholder variant in the snippet and replace it with your platform’s merge tag for that field. This also avoids passing email addresses in URL parameters.Step 6 — QA & preview your recommendations
Before sending to your full list, use Personyze’s built-in QA tool (the QA step in the wizard) to verify recommendations are working and personalized correctly.
Look up any subscriber by email
In the QA step, type any subscriber’s email address into the Find user field. Personyze will instantly render the exact product images that user would see when they open their email — based on their current behavioral profile in real time.
Below the rendered recommendations, expand the user row to see their full product interaction history: every product they’ve viewed, added to cart, or purchased, with timestamps and session data. Useful for confirming that tracking is working correctly and that the algorithm is picking up on the right signals.
What to verify before sending
- Recommendations look personalized. The products in the QA preview should relate to that user’s known interests — not random. If they look generic, check that behavioral tracking events are firing and that the user’s email is being passed correctly from your site.
- Fallback renders cleanly. Test with a brand-new email address that has no history. You should see Best Sellers or Most Popular — not a blank or broken widget.
- Send a real test from your ESP. Always send a test email from your actual ESP (not just the visual preview, which won’t resolve merge tags). Open it in your real inbox.
- Click-through destination is correct. Click each product image in your test email. Verify it goes to the correct product page and that Personyze’s click tracking fires for accurate attribution.
Step 7 — Performance reporting
After your campaign goes live, Personyze’s Performance tab gives detailed attribution metrics that go beyond what your ESP’s native analytics provide for the recommendation block.
Campaign-level metrics
Drill down by user
Switch to the Users tab within Performance to see a breakdown by individual subscriber — which specific email addresses clicked, added to cart, or purchased, and exactly which products they interacted with. Useful for:
- Validating that high-intent users are getting the most relevant recommendations
- Identifying which user segments drive the most purchase conversions from email
- Feeding insights back into your algorithm or segment choices for future campaigns
Tips for best results
- Keep your catalog fresh. Schedule daily or hourly feed syncs. Stale prices and out-of-stock products erode trust instantly.
- Mid-email placement outperforms top or bottom. Below the hero banner, above the footer consistently drives higher click-through than other positions.
- 3–4 products for transactional emails, 4–6 for dedicated recommendation sends. More products means more scrolling — test to find your sweet spot.
- Set a meaningful fallback. For new subscribers with no behavioral history, fall back to Best Sellers or Most Reviewed — not random products.
- Match your subject line to the personalization. If your subject says “Picked just for you,” the recommendations need to actually feel personal. Ensure behavioral data is populating before deploying at scale.
- Don’t skip alt text. A descriptive alt attribute on the recommendation image ensures corporate Outlook users who block images by default still see a clear CTA.